<!DOCTYPE html><html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>用户登录</title>
<link href="<?php echo $this->_webroot('youku/css/youku.css'); ?>" type="text/css" rel="stylesheet" />
<link href="<?php echo $this->_webroot('youku/css/win_v2.css'); ?>" type="text/css" rel="stylesheet" />
<script type="text/javascript" src="<?=$this->_webroot('index/js/jquery-1.9.0.min.js')?>"></script>
</head>
<body>
<script>
jQuery(function($){
//点击弹出确认层
$("#bt2").click(function(e) {
	if(window.parent.document.getElementById('winbodyheight')!=null) {
	 $('#winbodyheight', window.parent.document).css('height','340px');
	}	
	$("#bt2").addClass("current");
	$("#bt1").removeClass("current");
	$("#login_box").show();
	$("#register_box").hide();
});				
$("#bt1").click(function(e) {
	if(window.parent.document.getElementById('winbodyheight')!=null) {
	 $('#winbodyheight', window.parent.document).css('height','470px');
	}
	$("#bt1").addClass("current");
	$("#bt2").removeClass("current");
	$("#login_box").hide();
	$("#register_box").show();
	
});	


$("#password").keyup(function(){	
		var password = $(this).val();		
		$(this).next('span').html('');
		var chars = pwchars(password);
		if(password.length>0 && password.length<6){
			$(this).parent().children('.strength').html('密码强度：弱<span class="pswd_state pswd_state_def"><span class="level level_0"></span><span class="level level_0_1"></span><span class="level level_0_2"></span></span><span class="pswd_result">强</span>');
		}else if( 9>=password.length && password.length>=6 && chars==1 ){
			$(this).parent().children('.strength').html("密码强度：<span class='pswd_state'><span class='level level_1'></span></span><span class='pswd_result'>弱</span>");
		}else if( (9>=password.length && password.length>=6 && chars==2) || (16>=password.length && password.length>=10 && chars==1) ){
			$(this).parent().children('.strength').html("密码强度：<span class='pswd_state'><span class='level level_1'></span><span class='level level_2'></span></span><span class='pswd_result'>中</span>");
		}else if( (9>=password.length && password.length>=6 && chars==3) || (16>=password.length && password.length>=10 && chars==2) ){ 
			$(this).parent().children('.strength').html("密码强度：<span class='pswd_state'><span class='level level_1'></span><span class='level level_2'></span><span class='level level_3'></span></span><span class='pswd_result'>强</span>");
		}else if(16<password.length){
			$(this).next('span').html("<span class='ico__error'>密码不能超过16位</span>");
		}
});


	function pwchars(str){
        var a=0,b=0,c=0;
		for(var i=0;i<str.length;i++){
			if(str.charAt(i).charCodeAt(0)>=48 && str.charAt(i).charCodeAt(0) <=57){//数字
				a = 1;
			}else if( (str.charAt(i).charCodeAt(0)>=65 && str.charAt(i).charCodeAt(0)<=90) || (str.charAt(i).charCodeAt(0)>=97 && str.charAt(i).charCodeAt(0)<=122) ){//字母
				b = 1;
			}else{//符号
				c = 1;
			}
		}
		return (a+b+c);
	}



   }
)
</script>
<script language="JavaScript">
<!--
function changImg(id){
document.getElementById(id).src ='<?php echo $this->_url('user/kcaptcha') .'?'; ?>'+Math.random(1);
}
function pfunc(username){	
	window.parent.document.getElementById("shekengmask").style.display="none";	
	window.parent.document.getElementById("genGoodsPanel").style.display="none";
	window.parent.document.getElementById("GB_login").innerHTML = "<a href='<?=$this->_url("user/index")?>'>"+username+"</a><a href='<?=$this->_url("user/index")?>' >会员中心</a><a href='<?=$this->_url("user/logout/?from=1")?>' >安全退出</a>";		
}
//-->
</script>
<SCRIPT LANGUAGE="JavaScript">
<!--
function postdo(){
	document.getElementById("login_btn").innerHTML ="正在处理...";	
	document.login_form.submit();
}
function regpostdo(){
	document.getElementById("reg_bution").innerHTML ="正在处理...";	
	document.register_form.submit();
}
//-->
</SCRIPT>
<div class="winlogin" style="display:block;">
    <div class="YK_tabs">
        <ul>
            <li class="current" id="bt2" ><a href="javascript::"  >登录</a></li>
            <li id="bt1"><a href="javascript::" >注册</a></li>
        </ul>
        <div class="clear"></div>
    </div>
	<div class="main">
        <div id="register_box" style="display:none;">

            <div class="formbox">
                <div id="register" style="display:;">
                    <form class="regwin" name="register_form" id="register_form" action="<?php echo $this->_url('/user/postreg/');?>" method="post"  target="hideLoginFrame">
                    <div class="entry">
                        <input type="text" class="form_input" id="email" name="data[user][email]" value="邮箱"/>
                        <span class="msg"></span>
                    </div>
                    <div class="entry">
                        <input type="text" class="form_input" id="username" name="data[user][username]" value="昵称"/>
                        <span class="msg">2-15个汉字或4-30个字符</span>
                    </div>
                    <div class="entry">
                        <input type="password" class="form_input" id="password" name="data[user][password1]" value="密码"/>
                        <span class="msg">6~16位数字、字母或符号</span>
                        <div class="strength">
                            密码强度：弱
                            <span class="pswd_state pswd_state_def">
	                        <span class="level level_0"></span>
                            <span class="level level_0_1"></span>
                            <span class="level level_0_2"></span></span> 
                            <span class="pswd_result">强</span>
                        </div>
                    </div>
                    <div class="entry">
                        <input type="password" class="form_input" id="re_pswd" name="data[user][ckpassword]" value="确认密码"/>
                        <span class="msg"></span>
                    </div>
                    <div class="entry codearea">
                        <input type="text" class="form_input" id="captcha" name="data[user][captcha]" value="验证码"/>
                        <img class="vcode" src="<?php echo $this->_url('user/kcaptcha') .'?'. time(); ?>" id="cheimg1" title="看不清，换一个" onClick="changImg('cheimg');" width="90" height='40'  />
                        <a href="javascript:void(0);"  onClick="changImg('cheimg1');">获取验证码</a>
                        <span class="msg"></span>
                    </div>
                    <div class="entry terms">
                        <a href="<?php echo $this->_url('user/agreement'); ?>" target="_blank">桂房网注册协议</a>及<a href="<?php echo $this->_url('user/agreement'); ?>" target="_blank">版权声明</a>
                    </div>
                    <div class="entry">
	                    <input type="hidden" name="type" value="1"/>
		                <input type="hidden" name="ismask" value="1"/>     
                        <span class="regbtn" id="reg_bution"><a href="javascript:;" onClick="regpostdo()"><em>注册</em></a></span>
                        <span class="tips"><a href="<?php echo $this->_url('/user/login');?>" target="_blank" >已有帐号登录</a></span>
                    </div>
                    </form>
                </div>
			</div><!--formbox END-->


		</div><!--register END-->
        
        <div id="login_box">
			<div class="formbox">
                <div>
                    <form class="loginwin" id="login_form" name="login_form" action="<?php echo $this->_url('/user/login');?>" method="POST"  onsubmit="return postdo()"   target="hideLoginFrame">
                        <div class="entry">
                            <input type="text" class="form_input form_input_defaultvalue" name="data[user][username]" value="邮箱/手机" id="user_name_login" onfocus="if(this.value=='邮箱/手机')this.value='',this.className='form_input';" onblur="if(this.value=='')this.value='邮箱/手机',this.className='form_input form_input_defaultvalue';" />
                        </div>
                        <div class="entry">
                            <input type="password" class="form_input" id="passwd_login" name="data[user][password]" onfocus="this.next().style.display='none';" onblur="if(this.value=='')this.next().style.display='block';" />
                            <span class="placeholder form_input_defaultvalue" style="display:block;" onclick="this.style.display='none',this.up().down().focus();">密码</span>
                        </div>
                        <div class="entry">
	                        <input type="hidden" name="ischeck" value="1"/>
		                    <input type="hidden" name="ismask" value="1"/>    
                            <input type="text" class="form_input" id="captcha_l" name="data[user][captcha]" value="" style="width:100px;" />
                            <img src="<?php echo $this->_url('user/kcaptcha') .'?'. time(); ?>" id="cheimg" title="看不清，换一个" onClick="changImg('cheimg');" width="90" height='40' />
                            <a href="javascript::" onClick="changImg('cheimg');">获取验证码</a>
                                                    </div>
                        <div class="entry">
                            <div class="error" id="error"></div>
                        </div>
                        <div class="entry save">
                            <!--<input type="checkbox" id="forever" name="forever" checked /><label for="savepswd">记住我</label>-->	
                            <a  href="<?php echo $this->_url('/user/forgot');?>" target="_blank">找回密码</a>
                        </div>
                        <div class="entry">
                            <span class="loginbtn" id="login_btn"><a><button type="submit" style="width:100%;height:100%;background:none;border:none;cursor:pointer;cursor:hand;"><em>登录</em></button></a></span>
                            <span class="tips">没有帐号？<a href="<?php echo $this->_url('/user/reg');?>" target="_blank" >马上注册</a></span>
                        </div>
                       
                    </form>
                </div>
                <div class="propinfo">
                    <div class="title">使用合作网站帐号登录</div> 
                    <ul>
                        <a href="<?php echo $this->_url('service/openLogin/qq');?>"  target="_blank">
                            <li><div class="form_btn form_btn_l form_btnsub_l"><span class="form_btn_text"><span class="form_btn_icon form_btn_icon_left form_btn_icon_qq"></span>QQ帐号</span></div></li>
                        </a>
                    </ul>

                </div>
			</div><!--formbox END-->
		</div><!--login END-->
		
	</div><!--main end-->
</div><!--winlogin END-->
<iframe name="hideLoginFrame" id="hideLoginFrame" border="0" style="display:none"></iframe>
</body></html>